//行驶热力图，用来显示当前所有路段的交通状态情况by程俊杰
function echart_10(dataheat,dataposition) {

    let myChart = echarts.init(document.getElementById('chart_10'));
    let option = null;
    $.get('../static/geojson/hhh.geojson', function (geoJson) {
        echarts.registerMap('hhh', geoJson); //注册地图
        myChart.off('georoam');
        myChart.on('georoam', function (params) {
         console.log(myChart.getOption().geo)  //地图中的信息，包括经纬度、缩放大小等
        });
        option = {
            title: {
                show: true,
                text: "车辆行驶热力图",
                left:'center',
                top:10,
                textStyle:{
                    color:'#09b9ea',
                    fontSize:25,
                }
            },
            color:['red','blue','green'],
            tooltip: {
                position: 'top',
                formatter: '{a}：<br/>({c0})',
                show: true,
            },
            legend: {
                //图例组件设置
                // orient: 'vertical',horizontal
                orient: 'horizontal',
                left: 25,
                bottom: 0,
                data: ['行驶车辆热力图', '车辆位置实时显示','车辆轨迹显示'],  //名称
                textStyle: {
                    color: '#fff',
                    fontSize: 15,
                }
            },
            backgroundColor: 'rgba(0,0,0,0.1)',
            //backgroundColor: 'rgba(0,0,0,0.6)',
            visualMap: {
                // type: 'piecewise',
                right:25,
                bottom:0,
                min: -10,
                max: 30,
                calculable: true,
                realtime: true,
                seriesIndex: 0, // 将 visualMap 绑定在第一个系列上
                inRange: {
                    color: ['#ff0000', '#ff5303','#1aff00' ].reverse()
                    // color: ['#1aff00','#ff5303', '#ff0000'].reverse()
                },
                inverse: false, //是否反转 visualMap 组件
                textStyle: {
                    color: '#fff'
                }
            },
            geo: {
                map: 'hhh',  //必须以注册的地图名称一致
                roam: true,
                zoom:1.3, //设置初始化缩放比例
                label: {
                    normal: {
                        show: true,
                        color: '#fff'
                    },
                    emphasis: {
                        show: false,
                        show: false,
                        color: '#fff'
                    }
                    // color:'#fff'
                },
                itemStyle: {
                    normal: {
                        areaColor: '#ffffff',
                        borderColor: '#ffffff'
                    },
                    emphasis: {
                        areaColor: '#ff000e'
                    }
                }
            },
            series: [
                {
                    name: '行驶车辆热力图',
                    type: 'heatmap',  //将type改为heatmap 显示为热力图
                    coordinateSystem: 'geo',
                    symbolSize: 1,   //数据点大小
                    roam: true,		//是否可以
                    label: {
                        normal: {
                            show: false
                        },
                        emphasis: {
                            show: false
                        }
                    },
                    textFixed: {
                        Alaska: [10000, -20]
                    },
                    data: dataheat
                },
                {
                    // scatter  heatmap
                    name: '车辆位置实时显示',
                    type: 'scatter',  //将type改为heatmap 显示为热力图
                    coordinateSystem: 'geo',
                    symbolSize: 5,   //数据点大小
                    roam: true,		//是否可以
                    label: {
                        normal: {
                            show: false
                        },
                        emphasis: {
                            show: false
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: '#02ffff',//图例颜色
                        },
                        emphasis: {
                            borderColor: '#000dff',
                            borderWidth: 4
                        }
                    },
                    data: dataposition
                },
                {
                    name: '道路标注',
                    type: 'scatter',
                    coordinateSystem: 'geo',
                    symbolSize: 0,
                    label: {
                        show: true,
                        // formatter: '{b}',
                        fontSize: 20,
                        textStyle: {
                            color: '#ffffff',
                            fontSize: 20,
                            rich: {
                                label0: {
                                    rotate: 30,
                                    fontSize: 15,
                                },
                                label1: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label2: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label3: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label4: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label5: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label6: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label7: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label8: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label9: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                }
                            }
                        }
                    },
                    data: [
                        {
                            value: [140, -80],
                            label: {
                                formatter: '{label0|路段一}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [290, -190],
                            label: {
                                formatter: '{label1|路段二}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [340, -500],
                            label: {
                                formatter: '{label2|路段三}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [140, -400],
                            label: {
                                formatter: '{label3|路段四}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-10, -300],
                            label: {
                                formatter: '{label4|路段五}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [70, -580],
                            label: {
                                formatter: '{label5|路段六}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-100, -460],
                            label: {
                                formatter: '{label6|路段七}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-310, -390],
                            label: {
                                formatter: '{label7|路段八}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-240, -180],
                            label: {
                                formatter: '{label8|路段九}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-130, 60],
                            label: {
                                formatter: '{label9|路段十}', // 使用 rich 命名文本
                            }
                        }
                    ]
                }
            ]
        }
        myChart.setOption(option);
    });
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
// 时间轴交通流量统计by程俊杰
function echart_2(data_x,data_y) {
    // 基于准备好的dom，初始化echarts实例
    let myChart = echarts.init(document.getElementById('chart_2'));
    let base = +new Date(1988, 9, 3);
    let oneDay = 24 * 3600 * 1000;
    let data = [[base, Math.random() * 300]];
    for (let i = 1; i < 20000; i++) {
        let now = new Date((base += oneDay));
        data.push([+now, Math.round((Math.random() - 0.5) * 20 + data[i - 1][1])]);
    }
    let option = {
        title: {
                show: true,
                text: "路段断面车流量统计",
                x:'center',
                top:1,
                textStyle:{
                    color:'#09b9ea',
                    fontSize:22,
                }
            },
        grid: { // 让图表占满容器
            top: "50px",
            left: "50px",
            right: "20px",
            bottom: "62px"
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross'
            }
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            // prettier-ignore
            data: data_x,
            axisLabel: {
                show: true,
                textStyle: {
                    color: '#ffffff',  //更改坐标轴文字颜色
                    fontSize: 12      //更改坐标轴文字大小
                },
            },
        },
        yAxis: {
            type: 'value',
            axisPointer: {
                snap: true
            },
            axisLabel: {
                formatter: '{value} 辆',
                show: true,
                textStyle: {
                    color: '#ffffff',  //更改坐标轴文字颜色
                    fontSize: 14      //更改坐标轴文字大小
                },
            },
        },
        visualMap: {
            show: false,
            dimension: 0,
            pieces: [
                {
                    gt: 0,//起始点
                    lte: 18,//终止点
                    color: '#ff0000'//区段颜色
                },
            ]
        },
        dataZoom: [
            {
                type: 'inside',
                start: 0,
                end: 100
            },
            {
                start: 0,
                end: 18
            }
        ],
        series: [
            {
                name: 'traffic flow',
                type: 'line',
                smooth: true,
                // prettier-ignore
                data: data_y,
                areaStyle: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                        {
                            offset: 0,
                            color: 'rgb(255, 158, 68)'
                        },
                        {
                            offset: 1,
                            color: 'rgb(255, 70, 131)'
                        }
                    ])
                },
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//雷达图，显示0.5h平均车速by刘茜
function echart_4(dataradar) {
    // 基于准备好的dom，初始化echarts实例
    let myChart = echarts.init(document.getElementById('chart_4'));
    let option = {
        title: {
                show: true,
                text: "平均车速统计",
                x:'center',
                top:1,
                textStyle:{
                    color:'#09b9ea',
                    fontSize:22,
                }
            },
        grid: { // 让图表占满容器
            top: "50px",
            left: "50px",
            right: "20px",
            bottom: "62px"
        },
        color:['#cd4800','#03affc'],
        textStyle: {
                fontSize: 15,
                color: '#ffffff',
            },
        radar: {
            // shape: 'circle',
            nameGap:5,//调整文字与图距
            top:20,
            center:['50%','60%'],//雷达图中心
            radius:90,//雷达图大小
            indicator: [
                { name: '路段一', max: 160 },
                { name: '路段二', max: 160 },
                { name: '路段三', max: 160 },
                { name: '路段四', max: 160 },
                { name: '路段五', max: 160 },
                { name: '路段六', max: 160 },
                { name: '路段七', max: 160 },
                { name: '路段八', max: 160 },
                { name: '路段九', max: 160 },
                { name: '路段十', max: 160 }
            ]
        },
        legend: {
            data: ['阈值','当前车速'],
            orient: 'vertical',
            x:"4%",
            y:"center",
            padding:[0,0,0,30],
            textStyle: {
                fontSize: 12,
                color: '#ffffff',
            },
        },
        series: [
            {
                name: 'Budget vs speed',
                type: 'radar',
                data: [
                    {
                        value: [55, 55, 55, 55, 55,55 ,55, 55, 55, 55],
                        name: '阈值'
                    },
                    {
                        value:dataradar,
                        name: '当前车速'
                    }
                ]
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//日历图全时间段全路段by程俊杰、王思璇
function echart_5() {
    // 基于准备好的dom，初始化echarts实例
    let myChart = echarts.init(document.getElementById('chart_5'));

    const hours = ['7:00', '7:30', '8:00', '8:30', '9:00', '9:30', '10:00', '10:30', '11:00','11:30',
        '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00'];

    const days = [
    '路段一', '路段二', '路段三','路段四', '路段五',
    '路段六', '路段七','路段八', '路段九','路段十'
    ];

    const data = [[0,0,5],[0,1,9],[0,2,3],[0,3,5],[0,4,8],[0,5,8],[0,6,7],[0,7,9],[0,8,8],[0,9,13],[0,10,12],[0,11,12],
        [0,12,6],[0,13,7],[0,14,6],[0,15,7],[0,16,7],[0,17,10],[0,18,6],[1,0,8],[1,1,9],[1,2,16],[1,3,12],
        [1,4,13],[1,5,9],[1,6,8],[1,7,12],[1,8,10],[1,9,14],[1,10,10],[1,11,7],[1,12,5],[1,13,6],[1,14,12],
        [1,15,9],[1,16,11],[1,17,12],[1,18,10],[2,0,22],[2,1,15],[2,2,13],[2,3,17],[2,4,25],[2,5,39],[2,6,35],
        [2,7,34],[2,8,36],[2,9,37],[2,10,31],[2,11,41],[2,12,35],[2,13,28],[2,14,35],[2,15,29],[2,16,26],
        [2,17,37],[2,18,35],[3,0,37],[3,1,35],[3,2,37],[3,3,32],[3,4,32],[3,5,45],[3,6,33],[3,7,43],[3,8,46],
        [3,9,38],[3,10,41],[3,11,49],[3,12,58],[3,13,48],[3,14,32],[3,15,38],[3,16,42],[3,17,38],[3,18,45],
        [4,0,11],[4,1,7],[4,2,5],[4,3,11],[4,4,18],[4,5,9],[4,6,15],[4,7,21],[4,8,14],[4,9,24],[4,10,38],
        [4,11,36],[4,12,31],[4,13,26],[4,14,18],[4,15,17],[4,16,12],[4,17,12],[4,18,18],[5,0,5],[5,1,3],
        [5,2,1],[5,3,2],[5,4,4],[5,5,16],[5,6,13],[5,7,11],[5,8,7],[5,9,11],[5,10,5],[5,11,7],[5,12,2],
        [5,13,7],[5,14,19],[5,15,8],[5,16,6],[5,17,8],[5,18,9],[6,0,1],[6,1,1],[6,2,3],[6,3,3],[6,4,4],
        [6,5,2],[6,6,1],[6,7,2],[6,8,2],[6,9,2],[6,10,1],[6,11,1],[6,12,1],[6,13,1],[6,14,1],[6,15,1],[6,16,1],
        [6,17,2],[6,18,1],[7,0,1],[7,1,1],[7,2,7],[7,3,6],[7,4,7],[7,5,5],[7,6,6],[7,7,1],[7,8,4],[7,9,7],[7,10,8],
        [7,11,8],[7,12,8],[7,13,8],[7,14,9],[7,15,8],[7,16,8],[7,17,4],[7,18,7],[8,0,15],[8,1,12],[8,2,11],
        [8,3,10],[8,4,5],[8,5,11],[8,6,8],[8,7,3],[8,8,3],[8,9,1],[8,10,4],[8,11,7],[8,12,5],[8,13,4],[8,14,8],
        [8,15,3],[8,16,8],[8,17,8],[8,18,4],[9,0,7],[9,1,2],[9,2,1],[9,3,2],[9,4,16],[9,5,15],[9,6,5],
        [9,7,1],[9,8,10],[9,9,1],[9,10,3],[9,11,16],[9,12,3],[9,13,10],[9,14,4],[9,15,3],[9,16,2],[9,17,1],[9,18,1]
    ] .map(function (item) {
    return [item[1], item[0], item[2] || '-'];
    });
    let option = {
        title: {
                show: true,
                text: "排队车辆统计",
                x:'center',
                top:1,
                textStyle:{
                    color:'#09b9ea',
                    fontSize:22,
                }
            },
        tooltip: {
            position: 'top'
        },
        grid: {
            height: '80%',
            width:'83%',
            bottom: '8%',
            left:'10%'
        },
        xAxis: {
            type: 'category',
            data: hours,
            splitArea: {
                show: true
            },
            axisLabel: {textStyle: {interval:2,color: '#fff', fontSize: 15}},
        },
        yAxis: {
            type: 'category',
            data: days,
            splitArea: {
                show: true
            },
            axisLabel: {textStyle: {color: '#fff', fontSize: 15}},
        },
        visualMap: {
            min: 0,
            max: 30,
            calculable: true,
            orient: 'vertical',
            bottom: '5%',
            right: '1%',
            inRange: {
                color: ['#adcdff','#4295ff', '#1165fa']
            },
            itemWidth: 12,
            textStyle: {color: '#fff', fontSize: 12},
            show:true
        },
        series: [
            {
                name: '停车数量',
                type: 'heatmap',
                data: data,
                label: {
                    show: true
                },
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//路段流量流向图by程俊杰、尹斌
function echart_7() {
    let myChart = echarts.init(document.getElementById('chart_7'));
    let option = {
        title: {
            show: true,
            text: "路段流量关系分析",
            x: 'center',
            top: 1,
            textStyle: {
                color: '#09b9ea',
                fontSize: 22,
            }
        },
        grid: {
            top: '10%',
        },
        animationDurationUpdate: 1500,
        animationEasingUpdate: 'quinticInOut',
        tooltip: {
            trigger: 'item',
        },
        legend: {
            // //图例组件设置
            show: true,
            // orient: 'vertical',horizontal
            orient: 'horizontal',
            y: 'center',
            x: '75%',
            data: [
                {name: '路段一', icon: 'circle'},
                {name: '路段二', icon: 'circle'},
                {name: '路段三', icon: 'circle'},
                {name: '路段四', icon: 'circle'},
                {name: '路段五', icon: 'circle'},
                {name: '路段六', icon: 'circle'},
                {name: '路段七', icon: 'circle'},
                {name: '路段八', icon: 'circle'},
                {name: '路段九', icon: 'circle'},
                {name: '路段十', icon: 'circle'},
            ],
            textStyle: {fontSize: 15, color: '#ffffff'}
        },
        series: [ // 系列列表
            {
                type: 'graph',
                layout: 'circular', // 使用环形布局
                // left:0,
                center: ['60%', '40%'],//雷达图中心
                roam: true,//是否开启平游或缩放
                zoom: 0.8, //设置初始化缩放比例
                data: [
                    {name: '路段一', category: '路段一', symbolSize: 16, value: 16638, itemStyle: {color: '#FFA07A'}},
                    {name: '路段二', category: '路段二', symbolSize: 16, value: 16868, itemStyle: {color: '#87CEFA'}},
                    {name: '路段三', category: '路段三', symbolSize: 46, value: 46132, itemStyle: {color: '#FF69B4'}},
                    {name: '路段四', category: '路段四', symbolSize: 13, value: 13058, itemStyle: {color: '#00FA9A'}},
                    {name: '路段五', category: '路段五', symbolSize: 8, value: 8587, itemStyle: {color: '#FFD700'}},
                    {name: '路段六', category: '路段六', symbolSize: 28, value: 28664, itemStyle: {color: '#9932CC'}},
                    {name: '路段七', category: '路段七', symbolSize: 22, value: 22672, itemStyle: {color: '#00FFFF'}},
                    {name: '路段八', category: '路段八', symbolSize: 23, value: 23675, itemStyle: {color: '#FF4500'}},
                    {name: '路段九', category: '路段九', symbolSize: 4, value: 4686, itemStyle: {color: '#1E90FF'}},
                    {name: '路段十', category: '路段十', symbolSize: 12, value: 12962, itemStyle: {color: '#FF00FF'}},
                ],
                links: [
                    {
                        source: '路段一',
                        target: '路段二',
                        value: 6508,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 6.508},
                    },
                    {
                        source: '路段一',
                        target: '路段十',
                        value: 5496,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 5.496},
                    },
                    {
                        source: '路段一',
                        target: '路段五',
                        value: 1196,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 1.196},
                    },
                    {
                        source: '路段一',
                        target: '路段三',
                        value: 903,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 0.903},
                    },
                    {
                        source: '路段一',
                        target: '路段四',
                        value: 739,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 0.739},
                    },
                    {
                        source: '路段一',
                        target: '路段九',
                        value: 709,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 0.709},
                    },
                    {
                        source: '路段一',
                        target: '路段七',
                        value: 234,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 0.234},
                    },
                    {
                        source: '路段一',
                        target: '路段八',
                        value: 558,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 0.558},
                    },
                    {
                        source: '路段一',
                        target: '路段六',
                        value: 295,
                        lineStyle: {color: '#FFA07A', curveness: 0.3, width: 0.295},
                    },
                    {
                        source: '路段二',
                        target: '路段十',
                        value: 4293,
                        lineStyle: {color: '#87CEFA', curveness: 0.3, width: 4.293},
                    },
                    {
                        source: '路段二',
                        target: '路段三',
                        value: 1609,
                        lineStyle: {color: '#87CEFA', curveness: 0.3, width: 1.696},
                    },
                    {
                        source: '路段二',
                        target: '路段四',
                        value: 1390,
                        lineStyle: {color: '#87CEFA', curveness: 0.3, width: 1.39},
                    },
                    {
                        source: '路段二',
                        target: '路段五',
                        value: 767,
                        lineStyle: {color: '#87CEFA', curveness: 0.3, width: 0.767},
                    },
                    {
                        source: '路段二',
                        target: '路段八',
                        value: 764,
                        lineStyle: {color: '#87CEFA', curveness: 0.3, width: 0.764},
                    },
                    {
                        source: '路段二',
                        target: '路段九',
                        value: 568,
                        lineStyle: {color: '#87CEFA', curveness: 0.3, width: 0.568},
                    },
                    {
                        source: '路段二',
                        target: '路段七',
                        value: 563,
                        lineStyle: {color: '#87CEFA', curveness: 0.3, width: 0.563},
                    },
                    {
                        source: '路段二',
                        target: '路段六',
                        value: 319,
                        lineStyle: {color: '#87CEFA', curveness: 0.3, width: 0.319},
                    },
                    {
                        source: '路段三',
                        target: '路段六',
                        value: 14774,
                        lineStyle: {color: '#FF69B4', curveness: 0.3, width: 14.774},
                    },
                    {
                        source: '路段三',
                        target: '路段七',
                        value: 11961,
                        lineStyle: {color: '#FF69B4', curveness: 0.3, width: 11.961},
                    },
                    {
                        source: '路段三',
                        target: '路段八',
                        value: 7705,
                        lineStyle: {color: '#FF69B4', curveness: 0.3, width: 7.705},
                    },
                    {
                        source: '路段三',
                        target: '路段四',
                        value: 5774,
                        lineStyle: {color: '#FF69B4', curveness: 0.3, width: 5.774},
                    },
                    {
                        source: '路段三',
                        target: '路段十',
                        value: 601,
                        lineStyle: {color: '#FF69B4', curveness: 0.3, width: 0.601},
                    },
                    {
                        source: '路段三',
                        target: '路段五',
                        value: 2053,
                        lineStyle: {color: '#FF69B4', curveness: 0.3, width: 2.053},
                    },
                    {
                        source: '路段三',
                        target: '路段九',
                        value: 665,
                        lineStyle: {color: '#FF69B4', curveness: 0.3, width: 0.665},
                    },
                    {
                        source: '路段四',
                        target: '路段九',
                        value: 67,
                        lineStyle: {color: '#00FA9A', curveness: 0.3, width: 0.067},
                    },
                    {
                        source: '路段四',
                        target: '路段六',
                        value: 1603,
                        lineStyle: {color: '#00FA9A', curveness: 0.3, width: 1.603},
                    },
                    {
                        source: '路段四',
                        target: '路段七',
                        value: 1598,
                        lineStyle: {color: '#00FA9A', curveness: 0.3, width: 1.598},
                    },
                    {
                        source: '路段四',
                        target: '路段八',
                        value: 1219,
                        lineStyle: {color: '#00FA9A', curveness: 0.3, width: 1.229},
                    },
                    {
                        source: '路段四',
                        target: '路段五',
                        value: 263,
                        lineStyle: {color: '#00FA9A', curveness: 0.3, width: 0.263},
                    },
                    {
                        source: '路段四',
                        target: '路段十',
                        value: 395,
                        lineStyle: {color: '#00FA9A', curveness: 0.3, width: 0.395},
                    },
                    {
                        source: '路段五',
                        target: '路段六',
                        value: 592,
                        lineStyle: {color: '#FFD700', curveness: 0.3, width: 0.592},
                    },
                    {
                        source: '路段五',
                        target: '路段十',
                        value: 515,
                        lineStyle: {color: '#FFD700', curveness: 0.3, width: 0.515},
                    },
                    {
                        source: '路段五',
                        target: '路段八',
                        value: 1865,
                        lineStyle: {color: '#FFD700', curveness: 0.3, width: 1.865},
                    },
                    {
                        source: '路段五',
                        target: '路段七',
                        value: 1134,
                        lineStyle: {color: '#FFD700', curveness: 0.3, width: 1.134},
                    },
                    {
                        source: '路段五',
                        target: '路段九',
                        value: 202,
                        lineStyle: {color: '#FFD700', curveness: 0.3, width: 0.202},
                    },
                    {
                        source: '路段六',
                        target: '路段十',
                        value: 264,
                        lineStyle: {color: '#9932CC', curveness: 0.3, width: 0.264},
                    },
                    {
                        source: '路段六',
                        target: '路段七',
                        value: 6333,
                        lineStyle: {color: '#9932CC', curveness: 0.3, width: 6.333},
                    },
                    {
                        source: '路段六',
                        target: '路段八',
                        value: 3925,
                        lineStyle: {color: '#9932CC', curveness: 0.3, width: 3.925},
                    },
                    {
                        source: '路段六',
                        target: '路段九',
                        value: 559,
                        lineStyle: {color: '#9932CC', curveness: 0.3, width: 0.559},
                    },
                    {
                        source: '路段七',
                        target: '路段八',
                        value: 6601,
                        lineStyle: {color: '#00FFFF', curveness: 0.3, width: 6.601},
                    },
                    {
                        source: '路段七',
                        target: '路段十',
                        value: 235,
                        lineStyle: {color: '#00FFFF', curveness: 0.3, width: 0.235},
                    },
                    {
                        source: '路段七',
                        target: '路段九',
                        value: 613,
                        lineStyle: {color: '#00FFFF', curveness: 0.3, width: 0.613},
                    },
                    {
                        source: '路段八',
                        target: '路段十',
                        value: 179,
                        lineStyle: {color: '#FF4500', curveness: 0.3, width: 0.179},
                    },
                    {
                        source: '路段八',
                        target: '路段九',
                        value: 849,
                        lineStyle: {color: '#FF4500', curveness: 0.3, width: 0.849},
                    },
                    {
                        source: '路段九',
                        target: '路段十',
                        value: 1219,
                        lineStyle: {color: '#1E90FF', curveness: 0.3, width: 0.849},
                    },
                ],
                categories: [
                    {name: '路段一', itemStyle: {normal: {color: '#FFA07A'}}},
                    {name: '路段二', itemStyle: {normal: {color: '#87CEFA'}}},
                    {name: '路段三', itemStyle: {normal: {color: '#FF69B4'}}},
                    {name: '路段四', itemStyle: {normal: {color: '#00FA9A'}}},
                    {name: '路段五', itemStyle: {normal: {color: '#FFD700'}}},
                    {name: '路段六', itemStyle: {normal: {color: '#9932CC'}}},
                    {name: '路段七', itemStyle: {normal: {color: '#00FFFF'}}},
                    {name: '路段八', itemStyle: {normal: {color: '#FF4500'}}},
                    {name: '路段九', itemStyle: {normal: {color: '#1E90FF'}}},
                    {name: '路段十', itemStyle: {normal: {color: '#FF00FF'}}}
                ],
                minsymbolSize: 1,
                label: { // 节点的标签配置项
                    show: true,
                    color: 'rgba(255,255,255,1)',
                    fontSize: 12,
                    position: 'top',
                },
            },
        ],
    };
    option && myChart.setOption(option);
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//路段车流量实时排名by程俊杰
function echart_8() {
    let myChart = echarts.init(document.getElementById('chart_8'));
    let option = null;
    option = {
        tooltip: {
            trigger: 'item',
            formatter: '{b} : {c}'
        },
        legend: {
            show: true,
            // orient: 'vertical',horizontal
            orient: 'vertical',
            y: 'center',
            x: '2%',
            icon: "circle",
            data: ['路段一', '路段二', '路段三', '路段四', '路段五', '路段六', '路段七', '路段八', '路段九', '路段十'],
            textStyle: {fontSize: 12, color: '#ffffff', padding: [0, 0, 0, -8],}
        },
        series: [
            {
                type: 'funnel',
                left: 160,
                top: 15,
                bottom: 10,
                width: '60%',
                min: 0,
                max: 100,
                minSize: '0%',
                maxSize: '100%',
                sort: 'descending',
                gap: 2,
                label: {
                    show: true,
                    position: 'inside'
                },
                labelLine: {
                    length: 10,
                    lineStyle: {
                        width: 1,
                        type: 'solid'
                    }
                },
                itemStyle: {
                    borderColor: '#fff',
                    borderWidth: 1
                },
                emphasis: {
                    label: {
                        fontSize: 20
                    }
                },
                data: [
                    {value: 60, name: '路段一'},
                    {value: 40, name: '路段二'},
                    {value: 100, name: '路段三'},
                    {value: 80, name: '路段四'},
                    {value: 100, name: '路段五'},
                    {value: 60, name: '路段六'},
                    {value: 40, name: '路段七'},
                    {value: 100, name: '路段八'},
                    {value: 80, name: '路段九'},
                    {value: 100, name: '路段十'}
                ]
            }
        ]
    };
    myChart.setOption(option);
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//柱状图by刘茜
function echart_9(data) {
    let myChart = echarts.init(document.getElementById('chart_9'));
    let option = {
        title: {
            show: true,
            text: "道路拥堵系数实时排名",
            x: 'center',
            top: 4,
            textStyle: {
                color: '#09b9ea',
                fontSize: 22,
            }
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {},
        grid: {
            left: '3%',
            right: '4%',
            bottom: '2%',
            top:'12%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01],
            axisLabel: {
                show: true,

                textStyle: {
                    color: '#fff'  //这里用参数代替了
                },

            },
        },
        yAxis: {
            type: "category",
            data: ['路段一', '路段十', '路段二', '路段三', '路段四', '路段五', '路段六', '路段七', '路段八', '路段九'],
            axisLabel: {
                show: true,
                fontSize: 15 ,
                textStyle: {
                    color: '#fff'  //这里用参数代替了
                }
            },
            //升序
            inverse: true,
            splitLine: {show: false},
            axisLine: {
                show: false,
            },
            axisTick: {
                show: false,
            },
            //key和图间距
            offset: 10,
            //动画部分
            animationDuration: 300,
            animationDurationUpdate: 300,
            //key文字大小
            nameTextStyle: {
                fontSize: 5,
            },
        },
        series: [
            {
                realtimeSort: true,
                type: 'bar',
                data: data,
                barWidth: 14,
                barGap: 10,
                smooth: true,
                valueAnimation: true,
                itemStyle: {
                    normal: {
                        "label": {
                            show: true, //开启显示
                            position: '', //在上方显示
                            textStyle: { //数值样式
                                color: '#fff',
                            }
                        },
                        "color": function (params) {
                            let colorarrays = ['#13c7af', '#00008b','#f00', '#ffde00', '#002a8f', '#003580', '#ed2939', '#003897', '#f93', '#bc002d'];
                            return colorarrays[params.dataIndex];
                        },
                    }
                }
            }
        ]
    };
    myChart.setOption(option);
//图表大小变动从新渲染，动态自适应
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//拥堵系数计算by刘茜
function echart_11() {
    let myChart = echarts.init(document.getElementById('chart_11'));
    let data = [
        {tech: '7:00', business: '路段三', num: 19.6},
        {tech: '7:00', business: '路段四', num: 24.5},
        {tech: '8:00', business: '路段四', num: 24},
        {tech: '8:00', business: '路段六', num: 18.9},
        {tech: '8:00', business: '路段十', num: 15.8},
        {tech: '9:00', business: '路段三', num: 28.4},
        {tech: '9:00', business: '路段四', num: 23.6},
        {tech: '10:00', business: '路段三', num: 28.9},
        {tech: '10:00', business: '路段四', num: 22.3},
        {tech: '10:00', business: '路段七', num: 18.2},
        {tech: '11:00', business: '路段三', num: 34.8},
        {tech: '11:00', business: '路段四', num: 35.2},
        {tech: '11:00', business: '路段九', num: 18.1},
        {tech: '12:00', business: '路段三', num: 33},
        {tech: '12:00', business: '路段四', num: 31.9},
        {tech: '12:00', business: '路段五', num: 26.8},
        {tech: '12:00', business: '路段七', num: 47.7},
        {tech: '13:00', business: '路段三', num: 37.3},
        {tech: '13:00', business: '路段四', num: 42.8},
        {tech: '13:00', business: '路段五', num: 21.6},
        {tech: '13:00', business: '路段十', num: 14},
        {tech: '14:00', business: '路段三', num: 27.2},
        {tech: '14:00', business: '路段四', num: 21.4},
        {tech: '14:00', business: '路段七', num: 51.3},
        {tech: '15:00', business: '路段三', num: 25.2},
        {tech: '15:00', business: '路段四', num: 30.2},
        {tech: '15:00', business: '路段七', num: 50.6},
        {tech: '16:00', business: '路段三', num: 30},
        {tech: '16:00', business: '路段四', num: 31.2},
        {tech: '16:00', business: '路段七', num: 19.5},
        {tech: '7:00', business: '路段一', num: 0},
    ];
    let xData = ['', '7:00', '8:00', '9:00', '10:00',
        '11:00', '12:00', '13:00', '14:00',
        '15:00', '16:00'];
    let yData = ['', '路段一', '路段二', '路段三', '路段四',
        '路段五', '路段六', '路段七', '路段八', '路段九', '路段十']
    let option = {

        title: {
            show: true,
            text: "拥堵系数评价分析",
            x: 'center',
            top: 4,
            textStyle: {
                color: '#09b9ea',
                fontSize: 22,
            }
        },
        grid: {
            left: '8%',
            bottom: '8%',
            top: '15%',
            right: '8%'
        },
        backgroundColor: 'rgba(0,0,0,0.13)',
        padding: 10,
        xAxis: {
            boundaryGap: ['10%', '0%'],
            nameTextStyle: {
                fontSize: 15,
                color: '#ffffff',
                verticalAlign: 'bottom',
                fontWeight: 'bold'
            },
            scale: true,
            axisTick: {
                show: true,
                inside: true
            },
            axisLabel: {
                show: true,
                textStyle: {
                    color: '#ffffff',  //更改坐标轴文字颜色
                    fontSize: 15      //更改坐标轴文字大小
                },
                formatter: function (params) {
                    return xData[params];
                }
            },
            interval: 1,
            splitNumber: xData.length,
            splitLine: {
                show: false,
                lineStyle: {
                    type: 'dashed',
                    color: '#e3e3e3'
                }
            }
        },
        color: ['rgb(228, 164, 52)'],
        yAxis: {
            boundaryGap: ['5%', '0%'],
            nameTextStyle: {
                align: 'right',
                fontSize: 15,
                color: '#ffffff',
                fontWeight: 'bold'
            },
            interval: 1,
            splitNumber: yData.length,
            scale: true,
            axisLine: {
                show: true
            },
            axisTick: {
                show: true,
                inside: true
            },
            axisLabel: {
                textStyle: {
                    color: '#ffffff',  //更改坐标轴文字颜色
                    fontSize: 15      //更改坐标轴文字大小
                },
                show: true,
                formatter: function (idx) {
                    console.log(idx); //
                    return yData[idx];
                }
            },
            splitLine: {
                show: true,
                lineStyle: {
                    type: 'dashed',
                    color: '#e3e3e3'
                }
            }
        },
        series: data.map((d, i) => {
            return {
                color: '#ff8800',
                type: 'effectScatter',
                label: {
                    show: true,
                    formatter: function (params) {
                        return data[params.seriesIndex].num;
                    }
                },
                symbolSize: d.num/1.2,
                data: [
                    [
                        xData.indexOf(d.tech),
                        yData.indexOf(d.business)
                    ]
                ]
            }
        })
    };
    myChart.setOption(option);
//图表大小变动从新渲染，动态自适应
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
function echart_16() {
    let myChart = echarts.init(document.getElementById('chart_16'));
    let data = [
        // {tech: '7:00', business: '路段三', num: 27.6},
        // {tech: '7:00', business: '路段四', num: 14.5},
        {tech: '8:00', business: '路段四', num: 26},
        {tech: '8:00', business: '路段六', num: 14.9},
        {tech: '9:00', business: '路段三', num: 28.4},
        {tech: '9:00', business: '路段四', num: 24.6},
        {tech: '10:00', business: '路段三', num: 19.9},
        {tech: '10:00', business: '路段五', num: 13.3},
        {tech: '10:00', business: '路段七', num: 8.2},
        {tech: '11:00', business: '路段三', num: 39.8},
        {tech: '11:00', business: '路段四', num: 39.2},
        {tech: '13:00', business: '路段八', num: 16.1},
        {tech: '12:00', business: '路段三', num: 38},
        {tech: '12:00', business: '路段四', num: 23.9},
        {tech: '12:00', business: '路段五', num: 18.8},
        {tech: '12:00', business: '路段七', num: 42.7},
        {tech: '13:00', business: '路段三', num: 29.3},
        {tech: '13:00', business: '路段四', num: 46.8},
        {tech: '13:00', business: '路段五', num: 17.6},
        {tech: '15:00', business: '路段十', num: 7},
        {tech: '14:00', business: '路段三', num: 31.2},
        {tech: '14:00', business: '路段五', num: 19.1},
        {tech: '14:00', business: '路段七', num: 51.3},
        {tech: '15:00', business: '路段三', num: 21.2},
        {tech: '15:00', business: '路段四', num: 31.2},
        {tech: '15:00', business: '路段七', num: 47.6},
        {tech: '16:00', business: '路段三', num: 28},
        {tech: '16:00', business: '路段四', num: 35.2},
        {tech: '16:00', business: '路段一', num: 12.5},

    ];
    let xData = ['', '7:00', '8:00', '9:00', '10:00',
        '11:00', '12:00', '13:00', '14:00',
        '15:00', '16:00'];
    let yData = ['', '路段一', '路段二', '路段三', '路段四',
        '路段五', '路段六', '路段七', '路段八', '路段九', '路段十']
    let option = {
        title: {
            show: true,
            text: "拥堵系数预测分析",
            x: 'center',
            top: 4,
            textStyle: {
                color: '#09b9ea',
                fontSize: 22,
            }
        },
        grid: {
            left: '8%',
            bottom: '8%',
            top: '15%',
            right: '8%'
        },
        backgroundColor: 'rgba(0,0,0,0.13)',
        padding: 10,
        xAxis: {
            boundaryGap: ['10%', '0%'],
            nameTextStyle: {
                fontSize: 15,
                color: '#ffffff',
                verticalAlign: 'bottom',
                fontWeight: 'bold'
            },
            scale: true,
            axisTick: {
                show: true,
                inside: true
            },
            axisLabel: {
                show: true,
                textStyle: {
                    color: '#ffffff',  //更改坐标轴文字颜色
                    fontSize: 15      //更改坐标轴文字大小
                },
                formatter: function (params) {
                    return xData[params];
                }
            },
            interval: 1,
            splitNumber: xData.length,
            splitLine: {
                show: false,
                lineStyle: {
                    type: 'dashed',
                    color: '#e3e3e3'
                }
            }
        },
        color: ['rgb(228, 164, 52)'],
        yAxis: {
            boundaryGap: ['5%', '0%'],
            nameTextStyle: {
                align: 'right',
                fontSize: 15,
                color: '#ffffff',
                fontWeight: 'bold'
            },
            interval: 1,
            splitNumber: yData.length,
            scale: true,
            axisLine: {
                show: true
            },
            axisTick: {
                show: true,
                inside: true
            },
            axisLabel: {
                textStyle: {
                    color: '#ffffff',  //更改坐标轴文字颜色
                    fontSize: 15      //更改坐标轴文字大小
                },
                show: true,
                formatter: function (idx) {
                    console.log(idx); //
                    return yData[idx];
                }
            },
            splitLine: {
                show: true,
                lineStyle: {
                    type: 'dashed',
                    color: '#e3e3e3'
                }
            }
        },
        series: data.map((d, i) => {
            return {
                color: '#ff0000',
                type: 'effectScatter',
                label: {
                    show: true,
                    formatter: function (params) {
                        return data[params.seriesIndex].num;
                    }
                },
                symbolSize: d.num / 1.2,
                data: [
                    [
                        xData.indexOf(d.tech),
                        yData.indexOf(d.business)
                    ]
                ]
            }
        })
    };
    myChart.setOption(option);
//图表大小变动从新渲染，动态自适应
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//车辆轨迹分析by程俊杰
function echart_12(congestionpoints) {
    let myChart = echarts.init(document.getElementById('chart_12'));
    let option = null;
    $.get('../static/geojson/hhh.geojson', function (geoJson) {
        echarts.registerMap('hhh', geoJson); //注册地图
        myChart.off('georoam');
        myChart.on('georoam', function (params) {
            console.log(myChart.getOption().geo)  //地图中的信息，包括经纬度、缩放大小等
        });
        option = {
            title: {
                show: true,
                text: "车辆轨迹分析及道路拥堵分布",
                left: 'center',
                top: 10,
                textStyle: {
                    color: '#09b9ea',
                    fontSize: 25,
                }
            },
            tooltip: {
                position: 'top',
                formatter: '{a}：<br/>({c0})',
                show: true,
            },
            legend: {
                //图例组件设置
                // orient: 'vertical',horizontal
                orient: 'horizontal',
                left: 25,
                bottom: 0,
                data: ['车辆1', '车辆2','车辆3','车辆4','车辆5', '拥堵点位分布'],  //名称
                textStyle: {
                    color: '#fff',
                    fontSize: 15,
                }
            },
            backgroundColor: 'rgba(0,0,0,0.1)',
            geo: {
                map: 'hhh',  //必须以注册的地图名称一致
                roam: true,
                zoom: 1.3, //设置初始化缩放比例
                itemStyle: {
                    normal: {
                        show: true,
                        areaColor: '#ffffff',
                        borderColor: '#ffffff'
                    },
                    emphasis: {
                        show: true,
                        areaColor: '#ff0000'
                    }
                }
            },
            series: [
                {
                    // scatter  heatmap
                    name: '车辆1',
                    type: 'scatter',  //将type改为heatmap 显示为热力图
                    coordinateSystem: 'geo',
                    symbolSize: 5,   //数据点大小
                    itemStyle: {
                        opacity: 0, // 关闭每个元素的具体颜色设置
                        normal: {
                            color: '#26ff00',//图例颜色
                        },
                        emphasis: {
                            borderColor: '#000dff',
                            borderWidth: 4
                        },

                    },
                    data: [
                        [-333.15, -297.63],
                        [-205.9, -348.76],
                        [-333.91, -297.3],
                        [-334.26, -297.2],
                        [-152.63, -354.59],
                        [-122.03, -290.35],
                        [-267.04, -324.51],
                        [-185.75, -355.69],
                        [-80.016, -189.75],
                        [-80.069, -190.09],
                        [-112.54, -271.85],
                        [-102.82, -253.22],
                        [-75.762, -183.45],
                        [-70.244, -175.57],
                        [-79.588, -194.22],
                        [-61.747, -158.28],
                        [-81.243, -204.43],
                        [-73.029, -180.02],
                        [-352.29, -289.18],
                        [-132.48, -313.17],
                        [-340.73, -294.35],
                        [-304.66, -309.09],
                        [-144.27, -341.61],
                        [-130.5, -308.56],
                        [-343.1, -293.31],
                        [-211.24, -346.84],
                        [-294.38, -313.26],
                        [-227.67, -340.58],
                        [-119.76, -285.78],
                        [-141.38, -334.59],
                        [-128.44, -303.97],
                        [-138.05, -326.46],
                        [-158.04, -358.1],
                        [-327.82, -299.8],
                        [-369.66, -281.1],
                        [-299.63, -311.13],
                        [-330.72, -298.64],
                        [-117.41, -281.17],
                        [-325.8, -300.6],
                        [-110.08, -267.22],
                        [-71.625, -177.92],
                        [-64.688, -164.4],
                        [-80.426, -202],
                        [-100.53, -248.61],
                        [-68.882, -173],
                        [-78.008, -186.03],
                        [-66.137, -167.43],
                        [-96.34, -239.67],
                        [-309.31, -307.2],
                        [-386.6, -274.07],
                        [-360.2, -285.43],
                        [-380.61, -276.48],
                        [-430.01, -257.53],
                        [-289.01, -315.43],
                        [-405.74, -266.76],
                        [-250.22, -331.52],
                        [-124.21, -294.88],
                        [-74.422, -181.87],
                        [-79.849, -199.78],
                        [-80.112, -190.3],
                        [-79.353, -187.97],
                        [-392.92, -271.63],
                        [-323.39, -301.58],
                        [-190.56, -354.17],
                        [-333.83, -297.34],
                        [-126.32, -299.39],
                        [-317.21, -304.03],
                        [-332.95, -297.71],
                        [-79.894, -189.32],
                        [-222.06, -342.76],
                        [-255.82, -329.17],
                        [-331.71, -298.22],
                        [-313.49, -305.51],
                        [-145.66, -344.65],
                        [-134.38, -317.68],
                        [-114.99, -276.51],
                        [-78.801, -187.07],
                        [-79.797, -192.62],
                        [-87.662, -219.75],
                        [-90.848, -227.19],
                        [-76.974, -184.81],
                        [-80.077, -190.17],
                        [-83.451, -209.94],
                        [-233.34, -338.35],
                        [-283.63, -317.64],
                        [-272.63, -322.18],
                        [-336.94, -295.99],
                        [-148.65, -349.99],
                        [-136.25, -322.13],
                        [-181.1, -357.08],
                        [-142.86, -338.26],
                        [-374.96, -278.82],
                        [-195.5, -352.5],
                        [-239.01, -336.1],
                        [-200.62, -350.67],
                        [-332.44, -297.92],
                        [-261.44, -326.85],
                        [-155.15, -356.53],
                        [-348.88, -290.74],
                        [-399.33, -269.17],
                        [-150.46, -352.39],
                        [-168.45, -359.82],
                        [-356.06, -287.4],
                        [-107.64, -262.57],
                        [-80.032, -191.13],
                        [-67.532, -170.26],
                        [-89.225, -223.39],
                        [-94.395, -235.34],
                        [-79.48, -195.93],
                        [-86.173, -216.28],
                        [-79.545, -197.77],
                        [-92.565, -231.16],
                        [-345.83, -292.11],
                        [-244.62, -333.82],
                        [-418.15, -262.1],
                        [-216.58, -344.85],
                        [-161.26, -359.25],
                        [-338.64, -295.26],
                        [-320.51, -302.71],
                        [-424.14, -259.8],
                        [-364.73, -283.31],
                        [-334.59, -297.09],
                        [-164.73, -359.84],
                        [-63.277, -161.58],
                        [-105.21, -257.89],
                        [-82.27, -207.08],
                        [-79.689, -188.71],
                        [-84.76, -213.01],
                        [-98.38, -244.11],
                        [-412.01, -264.41],
                        [-147.08, -347.43],
                        [-329.46, -299.14],
                        [-139.76, -330.63],
                        [-435.9, -255.26],
                        [-335.59, -296.6],
                        [-278.17, -319.88],
                        [-172.42, -359.24],
                        [-176.65, -358.29],
                    ]
                },//路段八
                {
                    // scatter  heatmap
                    name: '车辆2',
                    type: 'scatter',  //将type改为heatmap 显示为热力图
                    coordinateSystem: 'geo',
                    symbolSize: 5,   //数据点大小
                    itemStyle: {
                        opacity: 0, // 关闭每个元素的具体颜色设置
                        normal: {
                            color: '#02faff',//图例颜色
                        },
                        emphasis: {
                            borderColor: '#000dff',
                            borderWidth: 4
                        },

                    },
                    data: [
                        [276.005, -320],
                        [235, -292.71],
                        [-80.518, -87.266],
                        [232.907, -291.78],
                        [228.914, -288.99],
                        [-87.29, -82.957],
                        [163.106, -246.85],
                        [-86.032, -83.768],
                        [180.966, -258.7],
                        [235.379, -293.06],
                        [-66.255, -96.169],
                        [-313.42, 49.394],
                        [-262.49, 22.4479],
                        [-199.3, -16.735],
                        [-187.83, -23.679],
                        [-226.9, 0.22022],
                        [-121.09, -62.855],
                        [-159.43, -40.77],
                        [-231.9, 3.13389],
                        [-298.5, 42.2134],
                        [-250.6, 14.7021],
                        [-107.63, -70.592],
                        [-280.61, 33.2168],
                        [-236.78, 5.96658],
                        [-143.34, -50.116],
                        [-287.19, 36.7062],
                        [-93.713, -78.941],
                        [260.426, -309.68],
                        [211.368, -277.89],
                        [-68.955, -94.487],
                        [158.547, -243.73],
                        [96.4038, -201.08],
                        [172.074, -252.85],
                        [242.643, -297.64],
                        [364.556, -378.22],
                        [382.359, -389.41],
                        [-71.513, -92.873],
                        [193.739, -266.94],
                        [-42.762, -110.94],
                        [133.893, -226.55],
                        [-86.207, -83.609],
                        [107.81, -208.74],
                        [-60.367, -99.804],
                        [-22.227, -124.74],
                        [-12.875, -130.98],
                        [-63.403, -97.931],
                        [-84.815, -84.581],
                        [315.411, -346.09],
                        [-129.24, -58.139],
                        [-312.48, 48.9683],
                        [-266.26, 24.7948],
                        [-104.89, -72.203],
                        [-269.94, 27.0365],
                        [-102.37, -73.702],
                        [-88.55, -82.167],
                        [-91.346, -80.42],
                        [-295.83, 40.9421],
                        [-138.37, -52.938],
                        [-96.437, -77.222],
                        [-133.68, -55.594],
                        [-254.68, 17.3712],
                        [-87.523, -82.809],
                        [-309.69, 47.567],
                        [-204.98, -13.276],
                        [-153.96, -43.991],
                        [292.684, -331.18],
                        [335.42, -359.44],
                        [118.418, -215.89],
                        [-86.319, -83.536],
                        [-35.026, -116.11],
                        [58.6025, -176.34],
                        [201.528, -271.83],
                        [244.878, -299.15],
                        [139.021, -230.12],
                        [189.592, -264.28],
                        [-2.2893, -137.74],
                        [-293.09, 39.6292],
                        [-92.503, -79.694],
                        [84.1884, -192.88],
                        [320.464, -349.44],
                        [-82.85, -85.838],
                        [27.0486, -156.3],
                        [305.936, -339.93],
                        [280.162, -322.77],
                        [237.169, -294.18],
                        [271.916, -317.29],
                        [71.6439, -184.64],
                        [176.531, -255.79],
                        [310.589, -342.97],
                        [341.113, -363.27],
                        [284.342, -325.59],
                        [247.383, -300.9],
                        [-26.675, -121.75],
                        [149.032, -237.1],
                        [-170.6, -34.095],
                        [-241.69, 9.03312],
                        [-277.11, 31.2579],
                        [-210.6, -9.8524],
                        [-176.33, -30.636],
                        [235.164, -292.92],
                        [301.415, -336.95],
                        [225.423, -286.82],
                        [205.043, -273.99],
                        [264.121, -312.13],
                        [221.475, -284.29],
                        [-50.132, -106.18],
                        [9.22833, -144.93],
                        [219.258, -282.87],
                        [-38.947, -113.47],
                        [-86.307, -83.545],
                        [-301.07, 43.4447],
                        [-182.07, -27.158],
                        [-258.64, 19.9627],
                        [-125.05, -60.557],
                        [-290.22, 38.2219],
                        [-313.43, 49.394],
                        [358.644, -374.52],
                        [113.146, -212.32],
                        [52.1598, -172.24],
                        [234.046, -292.38],
                        [250.24, -302.9],
                        [-76.195, -89.934],
                        [185.337, -261.54],
                        [-53.686, -103.94],
                        [-7.7514, -134.28],
                        [-46.491, -108.52],
                        [-30.948, -118.87],
                        [21.0279, -152.42],
                        [296.996, -334.03],
                        [256.865, -307.33],
                        [228.564, -288.83],
                        [325.341, -352.66],
                        [208.312, -276.01],
                        [267.957, -314.67],
                        [235.995, -293.45],
                        [288.485, -328.38],
                        [376.513, -385.73],
                        [3.45124, -141.33],
                        [144.076, -233.64],
                        [330.297, -356.02],
                        [-305.68, 45.7047],
                        [-98.133, -76.196],
                        [-307.79, 46.6844],
                        [-312.84, 49.1421],
                        [-90.263, -81.101],
                        [-246.31, 11.949],
                        [-311.33, 48.3651],
                        [-87.961, -82.53],
                        [-221.7, -2.8911],
                        [-110.6, -68.878],
                        [-100.1, -75.031],
                        [-164.98, -37.466],
                        [-89.325, -81.686],
                        [-312.75, 49.0989],
                        [-117.36, -65.01],
                        [-216.12, -6.4571],
                        [-193.57, -20.203],
                        [-57.1, -101.82],
                        [128.747, -222.99],
                        [33.1855, -160.23],
                        [223.577, -285.64],
                        [370.554, -381.98],
                        [15.0847, -148.63],
                        [253.469, -305.07],
                        [226.908, -287.75],
                        [-73.91, -91.371],
                        [-17.629, -127.83],
                        [240.529, -296.29],
                        [216.833, -281.32],
                        [123.593, -219.44],
                        [78.0006, -188.79],
                        [45.7599, -168.18],
                        [-148.57, -47.132],
                        [-273.55, 29.1906],
                        [-303.46, 44.6376],
                        [-283.99, 35.0436],
                        [-95, -78.126],
                        [-113.84, -67.026],
                        [352.739, -370.77],
                        [197.738, -269.47],
                        [214.205, -279.67],
                        [102.242, -205],
                        [153.878, -240.49],
                        [39.4142, -164.17],
                        [234.439, -292.58],
                        [346.891, -366.99],
                        [-78.374, -88.587],
                        [90.3218, -197],
                        [230.875, -290.39],
                        [167.586, -249.86],
                        [65.1373, -180.49],
                        [238.69, -295.14],
                    ]
                },//路段二
                {
                    // scatter  heatmap
                    name: '车辆3',
                    type: 'scatter',  //将type改为heatmap 显示为热力图
                    coordinateSystem: 'geo',
                    symbolSize: 5,   //数据点大小
                    itemStyle: {
                        opacity: 0, // 关闭每个元素的具体颜色设置
                        normal: {
                            color: '#fffc00',//图例颜色
                        },
                        emphasis: {
                            borderColor: '#000dff',
                            borderWidth: 4
                        },

                    },
                    data: [
                        [215.191, -477.64],
                        [215.648, -476.51],
                        [216.095, -475.53],
                        [217.685, -472.44],
                        [201.099, -526.49],
                        [214.102, -495.39],
                        [193.302, -542.35],
                        [214.788, -520.22],
                        [212.04, -526.94],
                        [208.591, -509.8],
                        [207.492, -535.47],
                        [214.505, -482.24],
                        [213.262, -498.55],
                        [207.217, -512.76],
                        [204.177, -543.14],
                        [201.674, -548.43],
                        [205.147, -541.25],
                        [204.409, -519.23],
                        [215.189, -477.63],
                        [215.294, -477.66],
                        [215.327, -477.27],
                        [240.089, -428.78],
                        [220.735, -466.58],
                        [246.096, -417.63],
                        [219.602, -468.81],
                        [251.947, -407.14],
                        [218.114, -471.63],
                        [192.803, -547.15],
                        [200.717, -527.3],
                        [216.595, -516.3],
                        [209.499, -532.02],
                        [193.945, -549.12],
                        [206.689, -537.9],
                        [214.46, -481.62],
                        [196.965, -550.7],
                        [212.158, -501.72],
                        [209.937, -506.89],
                        [211.075, -528.72],
                        [205.047, -541.46],
                        [192.61, -544.77],
                        [215.07, -477.87],
                        [219.08, -469.8],
                        [228.418, -452.19],
                        [247.447, -415.25],
                        [233.991, -441.58],
                        [220.152, -467.74],
                        [214.808, -485.79],
                        [215.288, -518.89],
                        [202.243, -523.99],
                        [193.875, -541.07],
                        [202.315, -547.5],
                        [205.06, -517.6],
                        [196.408, -536.43],
                        [204.724, -518.44],
                        [215.543, -518.25],
                        [213.509, -523.81],
                        [209.52, -507.83],
                        [237.939, -433.25],
                        [231.185, -447.08],
                        [205.889, -515.69],
                        [212.305, -526.35],
                        [210.737, -529.37],
                        [198.124, -550.72],
                        [213.794, -522.82],
                        [208.597, -534.43],
                        [209.056, -508.82],
                        [208.815, -534.16],
                        [207.251, -536.33],
                        [213.829, -496.48],
                        [214.609, -483.55],
                        [213.554, -497.53],
                        [215.041, -519.56],
                        [195.765, -537.54],
                        [203.744, -520.79],
                        [216.63, -474.46],
                        [216.346, -475.01],
                        [218.586, -470.74],
                        [224.249, -459.94],
                        [203.724, -544.08],
                        [211.739, -502.79],
                        [203.397, -521.56],
                        [192.577, -545.97],
                        [214.944, -489.3],
                        [212.555, -500.63],
                        [203.352, -544.93],
                        [214.271, -521.53],
                        [202.774, -546.58],
                        [214.865, -486.61],
                        [212.945, -525.04],
                        [212.936, -499.55],
                        [212.596, -525.75],
                        [201.482, -525.69],
                        [214.973, -478.02],
                        [214.555, -482.87],
                        [214.815, -491.24],
                        [206.771, -513.75],
                        [213.294, -524.35],
                        [195.83, -550.41],
                        [204.071, -520.01],
                        [211.291, -503.84],
                        [201.865, -524.84],
                        [216.396, -516.62],
                        [205.457, -516.67],
                        [199.907, -528.98],
                        [214.603, -479.2],
                        [214.697, -492.24],
                        [214.346, -494.32],
                        [214.445, -480.4],
                        [199.199, -550.49],
                        [214.528, -520.86],
                        [199.083, -530.84],
                        [244.815, -419.91],
                        [242.378, -424.35],
                        [227.55, -453.85],
                        [225.052, -458.5],
                        [217.297, -473.19],
                        [243.575, -422.14],
                        [222.727, -462.74],
                        [226.704, -455.45],
                        [216.953, -473.86],
                        [214.946, -488.38],
                        [214.437, -481],
                        [214.549, -493.28],
                        [205.553, -540],
                        [195.102, -538.65],
                        [216.127, -517.13],
                        [194.465, -539.84],
                        [211.427, -528.1],
                        [215.138, -477.74],
                        [208.315, -534.77],
                        [214.68, -484.26],
                        [206.787, -537.71],
                        [213.656, -523.33],
                        [196.989, -535.31],
                        [206.409, -538.3],
                        [214.913, -487.48],
                        [210.01, -531.08],
                        [234.954, -439.62],
                        [238.996, -431.03],
                        [225.871, -457],
                        [233.032, -443.47],
                        [241.218, -426.56],
                        [230.254, -448.81],
                        [214.735, -478.68],
                        [198.081, -533.04],
                        [206.335, -514.71],
                        [207.668, -511.78],
                        [194.81, -549.86],
                        [211.743, -527.5],
                        [197.519, -534.18],
                        [210.355, -505.91],
                        [203.021, -522.36],
                        [204.674, -542.17],
                        [199.5, -529.88],
                        [215.818, -517.69],
                        [250.351, -410.07],
                        [235.92, -437.56],
                        [248.854, -412.74],
                        [232.1, -445.3],
                        [236.916, -435.44],
                        [229.322, -450.5],
                        [222.016, -464.08],
                        [200.929, -549.31],
                        [208.126, -510.79],
                        [210.389, -530.2],
                        [192.867, -543.56],
                        [214.739, -485.01],
                        [214.865, -478.29],
                        [198.598, -531.91],
                        [210.805, -504.89],
                        [214.502, -479.78],
                        [214.054, -522.19],
                        [215.872, -476.02],
                        [223.474, -461.35],
                        [221.354, -465.36],
                        [215.448, -476.97],
                        [200.307, -528.14],
                        [193.263, -548.2],
                        [202.623, -523.15],
                        [214.897, -490.26],
                        [200.117, -550.01],
                        [206.017, -538.86],
                        [203.061, -545.73],
                    ]
                },//路段三
                {
                    // scatter  heatmap
                    name: '车辆4',
                    type: 'scatter',  //将type改为heatmap 显示为热力图
                    coordinateSystem: 'geo',
                    symbolSize: 5,   //数据点大小
                    itemStyle: {
                        opacity: 0, // 关闭每个元素的具体颜色设置
                        normal: {
                            color: '#ff7002',//图例颜色
                        },
                        emphasis: {
                            borderColor: '#000dff',
                            borderWidth: 4
                        },

                    },
                    data: [
                        [-227.19, 20.1118],
                        [-216.87, 13.8539],
                        [-221.11, 16.3872],
                        [-104.09, -56.801],
                        [-119.07, -47.487],
                        [-214.28, 12.2785],
                        [-233.4, 24.0532],
                        [-271.42, 45.103],
                        [-174.44, -12.69],
                        [-235.39, 25.2626],
                        [-229.1, 21.3709],
                        [-219.14, 15.2066],
                        [-186.81, -5.0072],
                        [-227.1, 20.0565],
                        [-133.76, -38.004],
                        [-190.68, -2.5723],
                        [-211.42, 10.5468],
                        [-194.41, -0.1592],
                        [-246.54, 32.1034],
                        [-266.58, 42.8399],
                        [-332.36, 71.893],
                        [-318.85, 65.9371],
                        [-257.78, 38.4463],
                        [-240.3, 28.3198],
                        [-250.07, 34.1702],
                        [-276.56, 47.4261],
                        [-294.14, 55.035],
                        [-228.15, 20.7508],
                        [-226.45, 19.6569],
                        [-198.06, 2.18606],
                        [-325.51, 68.8782],
                        [-227.78, 20.4782],
                        [-312.65, 63.1309],
                        [-306.61, 60.4241],
                        [-156.88, -23.42],
                        [-170.13, -15.335],
                        [-222.84, 17.4201],
                        [-152.41, -26.203],
                        [-161.34, -20.687],
                        [-98.449, -60.355],
                        [-208.31, 8.62019],
                        [-300.48, 57.7323],
                        [-230.24, 22.0952],
                        [-225.53, 19.0733],
                        [-178.66, -10.072],
                        [-243.26, 30.1346],
                        [-287.91, 52.3731],
                        [-182.79, -7.5036],
                        [-138.59, -34.953],
                        [-147.89, -29.056],
                        [-128.85, -41.152],
                        [-123.94, -44.351],
                        [-224.32, 18.3292],
                        [-282.03, 49.8373],
                        [-237.68, 26.6842],
                        [-253.81, 36.2954],
                        [-231.67, 22.992],
                        [-201.63, 4.42391],
                        [-262.03, 40.6317],
                        [-227.84, 20.4946],
                        [-114.1, -50.627],
                        [-205.05, 6.57411],
                        [-109.11, -53.766],
                        [-143.3, -31.978],
                        [-165.75, -17.994],
                    ]
                },//路段十
                {
                    // scatter  heatmap
                    name: '车辆5',
                    type: 'scatter',  //将type改为heatmap 显示为热力图
                    coordinateSystem: 'geo',
                    symbolSize: 5,   //数据点大小
                    itemStyle: {
                        opacity: 0, // 关闭每个元素的具体颜色设置
                        normal: {
                            color: '#ff00d5',//图例颜色
                        },
                        emphasis: {
                            borderColor: '#000dff',
                            borderWidth: 4
                        },
                    },
                    data: [
                        [21.0402, -148.09],
                        [-104.6, -72.113],
                        [155.345, -163.38],
                        [133.26, -191.22],
                        [88.671, -191.85],
                        [-50.756, -104.99],
                        [10.7994, -141.67],
                        [96.2532, -196.74],
                        [65.669, -176.6],
                        [-133.99, -53.827],
                        [-221.72, 0.07864],
                        [-210.94, -6.4934],
                        [-185.27, -22.468],
                        [-151.19, -43.126],
                        [-110.09, -68.869],
                        [-195.42, -16.132],
                        [-155.87, -40.277],
                        [-142.12, -48.729],
                        [62.6223, -174.65],
                        [73.9592, -182.08],
                        [-103.27, -72.967],
                        [-5.5091, -131.82],
                        [-74.47, -90.767],
                        [-41.635, -110.31],
                        [71.3186, -180.34],
                        [118.655, -201.3],
                        [80.5138, -186.41],
                        [-101.37, -74.14],
                        [92.8316, -194.61],
                        [141.253, -182.34],
                        [76.3645, -183.66],
                        [89.002, -192.05],
                        [-46.302, -107.59],
                        [85.3828, -189.57],
                        [-59.091, -100.09],
                        [149.6, -171.71],
                        [-94.057, -78.666],
                        [-10.78, -128.61],
                        [-21.029, -122.34],
                        [59.3812, -172.58],
                        [15.9733, -144.88],
                        [-15.866, -125.47],
                        [-127.12, -58.14],
                        [-109.07, -69.513],
                        [-112.83, -67.142],
                        [-105.6, -71.571],
                        [-116.66, -64.746],
                        [-297.58, 42.0029],
                        [-268.7, 27.1189],
                        [-146.58, -45.951],
                        [-165.38, -34.514],
                        [-170.25, -31.576],
                        [55.951, -170.38],
                        [138.6, -185.44],
                        [98.158, -197.8],
                        [88.4929, -191.73],
                        [161.242, -154.39],
                        [40.1127, -160.26],
                        [87.4359, -190.98],
                        [-104.85, -71.989],
                        [-253.69, 18.7044],
                        [-121.4, -61.754],
                        [-107.35, -70.514],
                        [-26.415, -119.2],
                        [-63.029, -97.762],
                        [91.4381, -193.7],
                        [-91.45, -80.264],
                        [68.5464, -178.49],
                        [124.584, -198.45],
                        [-99.996, -74.97],
                        [35.6003, -157.37],
                        [146.761, -175.51],
                        [-263.8, 24.4174],
                        [-160.6, -37.406],
                        [-106.64, -70.914],
                        [-278.41, 32.2437],
                        [-137.91, -51.365],
                        [104.811, -200.65],
                        [152.473, -167.63],
                        [94.4641, -195.67],
                        [-102.5, -73.464],
                        [127.526, -196.32],
                        [30.8992, -154.38],
                        [143.972, -179.03],
                        [-85.336, -84.02],
                        [-54.999, -102.5],
                        [-96.353, -77.252],
                        [-66.87, -95.471],
                        [78.5425, -185.09],
                        [135.964, -188.4],
                        [110.092, -201.84],
                        [-114.62, -66.017],
                        [-248.44, 15.7479],
                        [-205.72, -9.7027],
                        [-124.13, -60.021],
                        [-216.26, -3.2434],
                        [-283.21, 34.7275],
                        [-104.36, -72.493],
                        [121.631, -200.14],
                        [100.187, -198.81],
                        [89.2008, -192.19],
                        [26.0331, -151.27],
                        [158.377, -158.78],
                        [5.58289, -138.44],
                        [48.5157, -165.65],
                        [-104.03, -72.508],
                        [52.3494, -168.08],
                        [-104.18, -72.472],
                        [83.9673, -188.65],
                        [0.0999, -135.15],
                        [-88.555, -82.039],
                        [-232.44, 6.57037],
                        [-287.99, 37.1662],
                        [-180.23, -25.548],
                        [-237.73, 9.66968],
                        [-106.08, -71.263],
                        [-292.73, 39.5313],
                        [-175.22, -28.58],
                        [-105.19, -71.806],
                        [-130.4, -56.071],
                        [-118.91, -63.329],
                        [-111.33, -68.097],
                        [-108.17, -70.048],
                        [-200.55, -12.919],
                        [130.429, -193.88],
                        [-103.78, -72.64],
                        [-81.875, -86.16],
                        [107.397, -201.35],
                        [-98.339, -75.997],
                        [115.714, -201.9],
                        [-36.754, -113.17],
                        [-70.663, -93.15],
                        [-78.227, -88.421],
                        [86.5435, -190.35],
                        [-190.32, -19.326],
                        [-273.57, 29.7215],
                        [-227.14, 3.38288],
                        [-258.79, 21.5935],
                        [-243.11, 12.7299],
                        [102.397, -199.77],
                        [112.854, -202.04],
                        [88.0678, -191.42],
                        [90.1845, -192.87],
                        [82.333, -187.6],
                        [44.4204, -163.03],
                        [-31.68, -116.14],
                    ]
                },//路段一
                {
                    name: '道路标注',
                    type: 'scatter',
                    coordinateSystem: 'geo',
                    symbolSize: 0,
                    label: {
                        show: true,
                        // formatter: '{b}',
                        fontSize: 20,
                        textStyle: {
                            color: '#ffffff',
                            fontSize: 20,
                            rich: {
                                label0: {
                                    rotate: 30,
                                    fontSize: 15,
                                },
                                label1: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label2: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label3: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label4: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label5: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label6: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label7: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label8: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                },
                                label9: {
                                    rotate: -30, // 设置第二个文本的旋转角度为负30度
                                    fontSize: 15,
                                }
                            }
                        }
                    },
                    data: [
                        {
                            value: [140, -80],
                            label: {
                                formatter: '{label0|路段一}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [290, -190],
                            label: {
                                formatter: '{label1|路段二}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [340, -500],
                            label: {
                                formatter: '{label2|路段三}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [140, -400],
                            label: {
                                formatter: '{label3|路段四}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-10, -300],
                            label: {
                                formatter: '{label4|路段五}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [70, -580],
                            label: {
                                formatter: '{label5|路段六}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-100, -460],
                            label: {
                                formatter: '{label6|路段七}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-310, -390],
                            label: {
                                formatter: '{label7|路段八}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-240, -180],
                            label: {
                                formatter: '{label8|路段九}', // 使用 rich 命名文本
                            }
                        }, {
                            value: [-130, 60],
                            label: {
                                formatter: '{label9|路段十}', // 使用 rich 命名文本
                            }
                        }
                    ]
                },
                {
                    name:'拥堵点位分布',
                    color: '#ff0000',
                    type: 'effectScatter',
                    coordinateSystem: 'geo', // 使用地理坐标系
                    // zlevel: 1, // 绘制先后顺序
                    rippleEffect: { // 设置涟漪效果参数
                        period: 4, // 动画周期，单位为秒
                        scale: 4, // 动画缩放倍数
                        brushType: 'fill' // 波纹绘制方式，可选 fill 和 stroke
                    },
                    // label: { // 设置散点标签
                    //     show: true,
                    //     position: 'right',
                    //     formatter: '{b}'
                    // },
                    symbolSize: function (val) { // 设置散点大小
                        return val[2] *1.5;
                    },
                    data: congestionpoints

                },
            ],

        }
        myChart.setOption(option);
    });
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//平行坐标系by王思璇
function echart_13() {
    let myChart = echarts.init(document.getElementById('chart_13'));
    const data1 = [
        [7, 5, 3, 24.4, '中'],
        [7.5, 9, 0.7, 9.4, '中'],
        [8, 3, 3.3, 17.4, '中'],
        [8.5, 5, 2.9, 13.6, '中'],
        [9, 8, 1.6, 8.7, '中'],
        [9.5, 8, 1.1, 12.2, '中'],
        [10, 7, 1.4, 17.4, '中'],
        [10.5, 9, 0.3, 13.6, '中'],
        [11, 8, 1.6, 11.1, '中'],
        [11.5, 13, 0.2, 8.7, '差'],
        [12, 12, 0.9, 8.1, '差'],
        [12.5, 12, 0.8, 7.6, '差'],
        [13, 6, 1.6, 12.2, '中'],
        [13.5, 7, 2.3, 13.6, '中'],
        [14, 6, 1.5, 20.3, '中'],
        [14.5, 7, 2.2, 11.1, '中'],
        [15, 7, 0.7, 15.2, '中'],
        [15.5, 10, 0.8, 11.1, '中'],
        [16, 6, 0.2, 17.4, '中']
    ];
    let data2 = [
        [7, 8, 7.3, 15.1, '中'],
        [7.5, 9, 5.2, 8.9, '中'],
        [8, 16, 1.3, 5.8, '差'],
        [8.5, 12, 4.1, 6.6, '中'],
        [9, 13, 1.8, 4.7, '差'],
        [9.5, 9, 0.7, 11.6, '中'],
        [10, 8, 3.8, 10.8, '中'],
        [10.5, 12, 0.3, 10.1, '差'],
        [11, 10, 0.2, 12.6, '中'],
        [11.5, 14, 0.4, 8.9, '差'],
        [12, 10, 1.2, 7.6, '差'],
        [12.5, 7, 1.7, 11.6, '中'],
        [13, 5, 2.2, 11.6, '中'],
        [13.5, 6, 2.3, 15.1, '中'],
        [14, 12, 0.5, 7.9, '差'],
        [14.5, 9, 0.2, 15.1, '中'],
        [15, 11, 1.6, 7.2, '差'],
        [15.5, 12, 1.3, 10.1, '差'],
        [16, 10, 0.8, 10.8, '差']
    ];
    let data3 = [
        [7, 22, 7.6, 6.1, '中'],
        [7.5, 15, 4.2, 6.5, '中'],
        [8, 13, 3.9, 7.2, '中'],
        [8.5, 17, 4.2, 4.3, '差'],
        [9, 25, 2.7, 3.9, '差'],
        [9.5, 39, 2.1, 3.6, '差'],
        [10, 35, 2.4, 4.3, '差'],
        [10.5, 34, 1.6, 3.5, '差'],
        [11, 36, 2.8, 3.5, '差'],
        [11.5, 37, 2.2, 3.3, '差'],
        [12, 31, 2.5, 3.6, '差'],
        [12.5, 41, 2.2, 3.8, '差'],
        [13, 35, 3.6, 3.3, '差'],
        [13.5, 28, 1.6, 5.3, '差'],
        [14, 35, 1.7, 4.6, '差'],
        [14.5, 29, 2.4, 5.5, '差'],
        [15, 26, 2.4, 4.4, '差'],
        [15.5, 37, 1.5, 4, '差'],
        [16, 35, 1.4, 4.1, '差']
    ];
    let data4 = [
        [7, 37, 0.2, 5.3, '差'],
        [7.5, 35, 0.4, 5.3, '差'],
        [8, 37, 0.1, 5.5, '差'],
        [8.5, 32, 0.7, 5.6, '差'],
        [9, 32, 1.2, 5.2, '差'],
        [9.5, 45, 0.5, 4.2, '差'],
        [10, 33, 0.5, 5.6, '差'],
        [10.5, 43, 0.9, 4, '差'],
        [11, 46, 0.7, 3.9, '差'],
        [11.5, 38, 1.5, 4.4, '差'],
        [12, 41, 0.8, 4.1, '差'],
        [12.5, 49, 0.2, 4, '差'],
        [13, 58, 0.3, 3.4, '差'],
        [13.5, 48, 0.9, 3.6, '差'],
        [14, 32, 0.4, 5.8, '差'],
        [14.5, 38, 0.9, 4.6, '差'],
        [15, 42, 0.4, 4.4, '差'],
        [15.5, 38, 0.6, 4.37, '差'],
        [16, 45, 0.3, 4.4, '差']
    ];
    let data5 = [
        [7, 11, 2.1, 14.9, '中'],
        [7.5, 7, 0.7, 23.1, '中'],
        [8, 5, 2.7, 23.1, '中'],
        [8.5, 11, 1.6, 14.9, '中'],
        [9, 18, 1.1, 9.5, '中'],
        [9.5, 9, 0.9, 16, '中'],
        [10, 15, 0.9, 12.2, '差'],
        [10.5, 21, 1.6, 9.0, '差'],
        [11, 14, 0.6, 11.6, '差'],
        [11.5, 24, 1.7, 5.9, '差'],
        [12, 38, 0.3, 4.8, '差'],
        [12.5, 36, 0.8, 4.7, '差'],
        [13, 31, 0.5, 5.6, '差'],
        [13.5, 26, 1.3, 6.7, '差'],
        [14, 18, 0.1, 10.4, '差'],
        [14.5, 17, 1.3, 9.9, '差'],
        [15, 12, 1.0, 17.3, '中'],
        [15.5, 12, 1.8, 10.4, '中'],
        [16, 18, 1.1, 10.4, '中']
    ];
    let data6 = [
        [7, 5, 9.6, 16, '中'],
        [7.5, 3, 6.3, 16, '中'],
        [8, 0, 3.3, 53.3, '良'],
        [8.5, 2, 4.2, 13.3, '中'],
        [9, 4, 4.4, 9.4, '中'],
        [9.5, 16, 1.5, 7.3, '差'],
        [10, 13, 2.5, 8.9, '差'],
        [10.5, 11, 2.3, 7.6, '中'],
        [11, 7, 3.5, 10.7, '中'],
        [11.5, 11, 1.7, 8.9, '中'],
        [12, 15, 3.9, 14.5, '中'],
        [12.5, 7, 4.5, 12.3, '中'],
        [13, 2, 4.7, 22.9, '中'],
        [13.5, 7, 1.6, 16, '中'],
        [14, 19, 1.7, 7.3, '差'],
        [14.5, 8, 2.4, 13.3, '中'],
        [15, 6, 2.4, 17.8, '中'],
        [15.5, 8, 1.5, 14.5, '中'],
        [16, 9, 1.4, 11.4, '中']
    ];
    let data7 = [
        [7, 0, 12.1, 13.8, '中'],
        [7.5, 1, 8.5, 22, '中'],
        [8, 3, 1.5, 36.7, '良'],
        [8.5, 3, 6.6, 15.7, '中'],
        [9, 4, 1.9, 18.3, '中'],
        [9.5, 2, 2.7, 55, '良'],
        [10, 0, 0.4, 55, '良'],
        [10.5, 2, 0.02, 18.3, '中'],
        [11, 2, 7.2, 22, '中'],
        [11.5, 2, 3.2, 55, '良'],
        [12, 0, 2.2, 110, '优'],
        [12.5, 0, 19.8, 55, '优'],
        [13, 1, 9.8, 12.2, '中'],
        [13.5, 1, 4.9, 110, '优'],
        [14, 0, 12.3, 110, '优'],
        [14.5, 0, 13.2, 110, '优'],
        [15, 0, 10.3, 110, '优'],
        [15.5, 2, 3.1, 27.5, '中'],
        [16, 0, 4.2, 55, '良']
    ];
    let data8 = [
        [7, 1, 10.8, 30.2, '良'],
        [7.5, 1, 8.8, 25.9, '良'],
        [8, 7, 2.7, 12.1, '中'],
        [8.5, 6, 6.2, 13.9, '中'],
        [9, 7, 1.0, 22.6, '中'],
        [9.5, 5, 5.3, 12.9, '中'],
        [10, 6, 5.1, 22.6, '中'],
        [10.5, 1, 3.5, 181, '优'],
        [11, 4, 5.1, 20.1, '中'],
        [11.5, 7, 3.2, 16.5, '中'],
        [12, 8, 1.9, 13.9, '中'],
        [12.5, 8, 4.2, 11.3, '中'],
        [13, 8, 3.3, 13.9, '中'],
        [13.5, 8, 4.9, 12.9, '中'],
        [14, 9, 2.5, 12.1, '中'],
        [14.5, 8, 5.2, 12.1, '中'],
        [15, 8, 3.8, 10.6, '中'],
        [15.5, 4, 2.1, 45.3, '良'],
        [16, 7, 3.4, 12.9, '中']
    ];
    let data9 = [
        [7, 15, 2.1, 14.1, '中'],
        [7.5, 12, 2.3, 12.8, '中'],
        [8, 11, 2.6, 14.8, '中'],
        [8.5, 10, 0.9, 25.6, '中'],
        [9, 5, 3.1, 23.5, '中'],
        [9.5, 11, 4.1, 18.8, '中'],
        [10, 8, 5.1, 20.1, '中'],
        [10.5, 3, 0.5, 56.4, '良'],
        [11, 3, 3.1, 47, '良'],
        [11.5, 0, 7.6, 70.5, '良'],
        [12, 4, 4.4, 31.3, '良'],
        [12.5, 7, 3.3, 21.7, '中'],
        [13, 5, 1.6, 35.3, '良'],
        [13.5, 4, 0.5, 56.4, '良'],
        [14, 8, 2.9, 28.2, '中'],
        [14.5, 3, 3.4, 56.4, '良'],
        [15, 8, 3.0, 23.5, '中'],
        [15.5, 8, 2.9, 23.5, '中'],
        [16, 4, 3.6, 31.3, '良']
    ];
    let data10 = [
        [7, 7, 7.9, 22.4, '中'],
        [7.5, 2, 7.2, 20.2, '中'],
        [8, 0, 11.1, 40.4, '良'],
        [8.5, 2, 5.4, 22.4, '中'],
        [9, 16, 1.0, 11.2, '中'],
        [9.5, 15, 5.1, 11.9, '中'],
        [10, 5, 1.1, 33.7, '良'],
        [10.5, 1, 7.5, 202, '优'],
        [11, 10, 1.5, 16.8, '中'],
        [11.5, 0, 0.9, 22.4, '中'],
        [12, 3, 2.1, 33.7, '中'],
        [12.5, 16, 0.1, 12.6, '中'],
        [13, 3, 3.1, 40.4, '良'],
        [13.5, 10, 5.9, 13.5, '中'],
        [14, 4, 1.1, 20.2, '中'],
        [14.5, 3, 3.8, 28.9, '良'],
        [15, 2, 5.3, 12.6, '中'],
        [15.5, 0, 1.2, 40.4, '良'],
        [16, 0, 9.8, 22.4, '良']
    ];
    let schema = [
        {name: 'time', index: 0, text: '时间(时)'},
        {name: 'stop_num', index: 1, text: '阻塞车辆数（辆）'},
        {name: 'avg_v', index: 2, text: '平均车速（m/s）'},
        {name: 'avg_d', index: 3, text: '车辆跟驰距离(m)'},
        {name: '等级', index: 4, text: '道路健康状况'}
    ];
    let lineStyle = {
        width: 1,
        opacity: 0.5
    };
    let option = {
        title: {
            show: true,
            text: "道路健康状态分析",
            left: 'center',
            top: 10,
            textStyle: {
                color: '#09b9ea',
                fontSize: 22,
            }
        },
        backgroundColor: 'rgba(0,0,0,0.1)',
        legend: {
            itemHeight: 15,
            icon: "circle",
            data: ['路段一', '路段二', '路段三', '路段四', '路段五', '路段六', '路段七', '路段八', '路段九', '路段十'],
            itemGap: 10,
            textStyle: {
                color: '#fff',
                fontSize: 15
            },
            x: 'center',
            y: '90%',
        },
        tooltip: {
            padding: 10,
            backgroundColor: '#222',
            borderColor: '#777',
            borderWidth: 1
        },
        parallelAxis: [
            {
                dim: 0,
                name: schema[0].text,
                inverse: true,
                min: 7,
                max: 16,
                nameLocation: 'start'
            },
            {dim: 1, name: schema[1].text, max: 60},
            {dim: 2, name: schema[2].text, inverse: true, max: 20, nameLocation: 'start'},
            {dim: 3, name: schema[3].text, inverse: true, max: 205, nameLocation: 'start'},
            {
                dim: 4,
                name: schema[4].text,
                type: 'category',
                data: ['优', '良', '中', '差']
            }
        ],
        parallel: {
            left: '4%',
            right: '4%',
            bottom: '14%',
            top: '33%',
            parallelAxisDefault: {
                type: 'value',
                name: '道路健康指数',
                nameLocation: 'end',
                nameGap: 25,
                nameTextStyle: {
                    color: '#fff',
                    fontSize: 14
                },
                axisLine: {
                    lineStyle: {
                        color: '#aaa'
                    }
                },
                axisTick: {
                    lineStyle: {
                        color: '#777'
                    }
                },
                splitLine: {
                    show: false
                },
                axisLabel: {
                    color: '#fff'
                }
            }
        },
        series: [
            {
                name: '路段一',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data1
            },
            {
                name: '路段二',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data2
            },
            {
                name: '路段三',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data3
            },
            {
                name: '路段四',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data4
            },
            {
                name: '路段五',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data5
            },
            {
                name: '路段六',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data6
            },
            {
                name: '路段七',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data7
            },
            {
                name: '路段八',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data8
            },
            {
                name: '路段九',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data9
            },
            {
                name: '路段十',
                type: 'parallel',
                lineStyle: lineStyle,
                data: data10
            }
        ]
    };
    myChart.setOption(option);
//图表大小变动从新渲染，动态自适应
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//基础数据by尹斌
function echart_14(num,stop_num,avg_dist) {
    let myChart = echarts.init(document.getElementById('chart_14'));
    const colors = ['#5470C6', '#91CC75', '#EE6666'];
    let option = {
        title: {
            show: true,
            text: "阻塞车辆及车辆跟驰距离分析",
            left: 'center',
            top: 10,
            textStyle: {
                color: '#09b9ea',
                fontSize: 22,
            }
        },
        color: colors,
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross'
            }
        },
        grid: {
            left: '8%',
            bottom: '8%',
            top: '15%',
            right: '8%'
        },
        legend: {
            data: ['总车辆', '阻塞车辆', '车辆跟驰距离'],
            textStyle: {
                color: '#fff',
                fontSize: 15
            },
            orient: 'horizontal',
            x: '10%',
            y: '10%',
        },
        xAxis: [
            {
                type: 'category',
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: '#ffffff'
                    }
                },
                axisTick: {
                    alignWithLabel: true
                },
                // prettier-ignore
                data: ['路段一', '路段二', '路段三', '路段四', '路段五', '路段六',
                    '路段七', '路段八', '路段九', '路段十']
            }
        ],
        yAxis: [
            {
                type: 'value',
                // name: '总车辆',
                position: 'right',
                alignTicks: true,
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: '#ffffff'
                    }
                },
                axisLabel: {
                    formatter: '{value} 辆'
                }
            },
            {
                type: 'value',
                name: '阻塞车辆',
                position: 'right',
                alignTicks: true,
                show: false,
                offset: 80,
                axisLine: {
                    lineStyle: {
                        color: '#ffffff'
                    }
                },
                axisLabel: {
                    formatter: '{value} 辆'
                }
            },
            {
                type: 'value',
                // name: '车辆跟驰距离',
                position: 'left',
                alignTicks: true,
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: '#ffffff'
                    }
                },
                axisLabel: {
                    formatter: '{value} m'
                }
            }
        ],
        series: [
            {
                name: '总车辆',
                type: 'bar',
                data: num
            },
            {
                name: '阻塞车辆',
                type: 'bar',
                yAxisIndex: 1,
                data: stop_num
            },
            {
                name: '车辆跟驰距离',
                type: 'line',
                yAxisIndex: 2,
                data: avg_dist
            }
        ]
    };
    myChart.setOption(option);
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
//道路健康排名by尹斌
function echart_15() {
    let myChart = echarts.init(document.getElementById('chart_15'));
    let option = {
        title: {
            show: true,
            text: "道路交通拥堵率",
            left: 'center',
            top: 10,
            textStyle: {
                color: '#09b9ea',
                fontSize: 22,
            }
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {
            show: false,
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01],
            axisLine: {
                show: true,
                lineStyle: {
                    color: '#ffffff'
                }
            },
        },
        yAxis: {
            type: 'category',
            data: ['路段三', '路段八', '路段七', '路段六', '路段九', '路段十', '路段二', '路段一', '路段五', '路段四'],
            axisLine: {
                show: true,
                lineStyle: {
                    color: '#ffffff'
                }
            },
        },
        series: [
            {
                name: '道路拥挤时段占比',
                type: 'bar',
                data: [5.26, 5.26, 10.53, 15.79, 15.79, 36.84, 52.63, 57.89, 68.42, 94.74],
                label: {
                    show: true,
                    position: 'outside'
                },
                data: [5.26, 5.26, 10.53, 15.79, 15.79, 36.84, 52.63, 57.89, 68.42, 94.74],
            }
        ]
    };
    myChart.setOption(option);
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}
















